package cn.tansanqinger.service.topic;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Service;

import cn.tansanqinger.pojo.Collecttopic;
import cn.tansanqinger.pojo.Topic;
import cn.tansanqinger.util.PageData;

@Service
public interface ITopicService {
	
	//随机读取一条数据
	public Topic randSelectTopic(HttpServletRequest request);
	
	//单一查询一条数据
	public Topic selectTopicOne(HttpServletRequest request);
	
	//用户提交答案 对数据进行查询和数据修改
	public PageData submitTopicResult(HttpServletRequest request);
	
	//收藏题目
	public PageData collectTopic(HttpServletRequest request);
	
	//屏蔽题目
	public PageData shieldTopic(HttpServletRequest request);
	
	//举报题目
	public PageData reportTopic(HttpServletRequest request);
	
	//对题目提出疑问
	public PageData queryTopic(HttpServletRequest request);
	
	//改题目是否被收藏
	public Collecttopic isCollectTopic(int o1, int o2);
	
	//查询收藏数据
	public List<Topic> selectMessage(HttpServletRequest request);
	
	//返回用户收藏数据条数
	public int numberCollect(HttpServletRequest request);
	
	//查询教师用户上传的数据信息
	public List<Topic> selectTeacherUpdata(HttpServletRequest request);
	
	//查询教师用户上传信息单一数据
	public Topic selectTeacherUpdataOne(HttpServletRequest request);
	
	//添加数据
	public PageData addUpdata(HttpServletRequest request);
	
	//修改教师上传的数据
	public PageData modificationTeacherUpdata(HttpServletRequest request);
	
	//删除相关数据
	public PageData deleteTeacherUpdata(HttpServletRequest request);

	//查询上传试题的数据量
	public int topicCountAll(HttpServletRequest request);
}
